<?xml version='1.0' encoding='ISO-8859-1' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"   
      xmlns:jb="http://java.sun.com/jsf/composite/componentes"
      xmlns:p="http://primefaces.org/ui">

    <SCRIPT language="JavaScript" type="text/javascript">

        function handleGuardarConcep(xhr, status, args) {                     
            if(args.validationFailed || !args.CallbackParam) {  

            } else {                              
                //carDialogDetalle.hide();  
            }  
        }  
    </SCRIPT>
    <h:form onsubmit="return checkSubmit();"  id="frmListaConcep">
        <h:panelGrid columns="6" cellpadding="4">
            <h:outputLabel  styleClass="label" value="#{i18n['periodo.label.monto.dia']} :"/>
            <h:outputText  value="#{periodoMBean.montoPorDia}" styleClass="botonRojo">
                <f:convertNumber pattern="#{applicationMBean.formatoMontos}" />
            </h:outputText>
            <h:outputLabel  styleClass="label" value="#{i18n['periodo.label.monto.hora']} :"/>
            <h:outputText  value="#{periodoMBean.montoPorHora}" styleClass="botonRojo" >
                <f:convertNumber pattern="#{applicationMBean.formatoMontos}" />
            </h:outputText>
            <h:outputLabel  styleClass="label" value="#{i18n['periodo.label.monto.minuto']} :"/>
            <h:outputText  value="#{periodoMBean.montoPorMinuto}" styleClass="botonRojo" >
                <f:convertNumber pattern="#{applicationMBean.formatoMontos}" />
            </h:outputText>
        </h:panelGrid>
        <h:panelGrid id="pgFormListaConcep"  >
            <p:dataTable id="tblPrincipal" value="#{periodoMBean.listaPerTrab}" var="dtoPT" paginatorPosition="top" rowKey="#{dtoPT.id}" 
                         paginator="true" rows="12"  widgetVar="widTable" >       
                <p:column headerText="#{i18n['general.label.id']}"  styleClass="general #{dto.inlinestyle}">
                    <h:outputText value="#{dtoPT.id}" styleClass="general" />
                </p:column>
                <p:column headerText="#{i18n['per.trab.con.concepto']}" styleClass="general" style="text-align: left;">
                    <h:outputText value="#{dtoPT.conceptoPlanillaDto.descripcion}" styleClass="general"/>                        
                </p:column>
                <p:column headerText="#{i18n['per.trab.con.clase']}" styleClass="general" style="text-align: left;">
                    <h:outputText value="#{dtoPT.conceptoPlanillaDto.claseDto.descripcion}" styleClass="general" />
                </p:column>   
                <p:column headerText="#{i18n['per.trab.con.valor']}"  style="text-align:right;"  styleClass="general">
                    <p:inputText label="#{i18n['per.trab.con.valor']}"
                                 value="#{dtoPT.valor}"  readonly="#{sessionMBean.accionDetalle == applicationMBean.ver}"
                                 size="10" onkeypress="return fn_validaTecla('decimal',this)"
                                 style="#{applicationMBean.estiloObligatorio}">
                        <f:validateLength maximum="20" minimum="1" />
                        <f:convertNumber pattern="#{applicationMBean.formatoMontos}" />
                    </p:inputText>
                </p:column>
                <p:column headerText="#{i18n['per.trab.con.unidad']}" styleClass="general" style="text-align: left;">
                    <h:outputText value="#{dtoPT.conceptoPlanillaDto.unidadDto.descripcion}" styleClass="general" />
                </p:column>  

            </p:dataTable>   
            <p:panel id="pnlAcciones">
                <h:panelGrid columns="10">
                    <p:commandButton id="btnGuardarValores" update=":frmListaConcep,:msjDialogDeta" 
                                     title="#{i18n['general.button.guardar.tip']}"
                                     rendered="#{sessionMBean.accionDetalle != applicationMBean.ver &amp;&amp; !periodoMBean.dto.isCerrado}"
                                     style="#{applicationMBean.cssBotonTransaccion}"
                                     ajax="true" 
                                     icon="ui-icon ui-icon-disk" 
                                     value="#{i18n['general.button.guardar']}" 
                                     action="#{periodoMBean.guardarValoresConcepto}"
                                     oncomplete="handleGuardarConcep(xhr, status, args);">                                    
                    </p:commandButton>  
                </h:panelGrid>
            </p:panel>
        </h:panelGrid>  

    </h:form>
</html>